package com.jial08.designpatterns.strategy.impl;

import com.jial08.designpatterns.strategy.Cash;

/**
 * <p>类描述：打折。</p>
 *
 * @author jl
 * @version v1.0.0.1。
 * @since JDK1.8。
 * <p>创建日期：2019/10/15 上午11:18。</p>
 */
public class CashRebate implements Cash {

	private double rebate;
	public CashRebate(double rebate) {
		this.rebate = rebate;
	}

	@Override
	public double acceptCash(double money) {
		return money * rebate;
	}
}
